package com.cn.designpatterns.ex.concrete.chain;

/**
 * @author zhangyi
 * @date 2018/12/25 18:35
 */
public class DirtyChain {

    public static void main(String[] args) {
        Handler h1 = new ConcreteHandler();
        Handler h2 = new Concrete2Handler();
        Handler h3 = new Concrete3Handler();
        h1.setSuccessful(h2);
        h2.setSuccessful(h3);
        int[] request = new int[]{-12,21,44,90,120,2,9};
        for(int i : request){
            h1.requestHandler(i);
        }
    }
}